import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const workflow: AppRouteModule = {
  path: '/wf',
  name: 'WF',
  component: LAYOUT,
  redirect: '/wf/todo',
  meta: {
    orderNo: 2000,
    icon: 'ion:settings-outline',
    title: t('routes.demo.workflow.todo'),
  },
  children: [
    {
      path: 'todo',
      name: 'Todo',
      meta: {
        title: t('routes.demo.workflow.todo'),
        ignoreKeepAlive: true,
      },
      component: () => import('/@/views/workflow/todo.vue'),
    },
    {
      path: 'start',
      name: 'Start',
      meta: {
        title: t('routes.demo.workflow.start'),
        ignoreKeepAlive: false,
      },
      component: () => import('/@/views/workflow/start.vue'),
    },
    {
      path: 'cc',
      name: 'CC',
      meta: {
        title: t('routes.demo.workflow.cc'),
        ignoreKeepAlive: true,
      },
      component: () => import('/@/views/workflow/cc.vue'),
    },
    {
      path: 'runing',
      name: 'Runing',
      meta: {
        title: t('routes.demo.workflow.runing'),
        ignoreKeepAlive: true,
      },
      component: () => import('/@/views/workflow/runing.vue'),
    },
    {
      path: 'flow/list',
      name: 'FlowList',
      meta: {
        title: t('routes.demo.workflow.flow_list'),
        ignoreKeepAlive: true,
      },
      component: () => import('/@/views/workflow/flow_list.vue'),
    },
    {
      path: 'form/list',
      name: 'FormList',
      meta: {
        title: t('routes.demo.workflow.form_list'),
        ignoreKeepAlive: true,
      },
      component: () => import('/@/views/workflow/form_list.vue'),
    },
    {
      path: 'flow/ui',
      name: 'FlowUI',
      meta: {
        title: t('routes.demo.workflow.flow_ui'),
        ignoreKeepAlive: true,
      },
      component: () => import('/@/views/flow/ui/index.vue'),
    },
  ],
};

export default workflow;
